<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>开立发票</title>
	<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
	<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/scriptvalidator.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/linkage.js" type="text/javascript"></script>
	<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
<script  language='javascript'>
function checkSubmit(){
 	var staffForm = document.searchForm;
	if(!Validator.Validate(staffForm, 3)){
		return false;
	}
	return true;
 }
function doAjaxBillName(){
		var select=document.getElementById("billName").value;
		$.ajax({
			  async:false,
			  type: 'POST',
			  url:"<s:property value='contextPath'/>/mf/core/ajaxBillName.do?billName="+select,
			  dataType: "json",
			  success: function(data) {
				  if(data){
					  alert("发票名重复!请重新输入");
					  return false;
				  }else{
					  return true;
				  }
				  
			  }
			});
	}
	function doAjaxBillNum(i){
			var select=document.getElementById("billNum");
			$.ajax({
				  async:false,
				  type: 'POST',
				  url:"<s:property value='contextPath'/>/mf/core/ajaxBillNum.do?billNum="+select.value,
				  dataType: "json",
				  success: function(data) {
					  if(data){
						  alert("发票号重复!请重新输入");
						  return false;
					  }else{
						  return true;
					  }
					  
				  }
				});
	
}
</script>
<div class="navigation">
	    <span><a href="javascript:window.history.back();"><img src="${contextPath}/images/back_nav_btn.png" /></a>
	    <a href="javascript:window.history.back();">返回</a>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>发票管理&gt;&gt;开立发票
    </div>
<div class="xt_main_right_center">
<form name="searchForm"   id="submitForm"  method="post" onSubmit="return checkSubmit();"  enctype="multipart/form-data"  action="add.do">
    <input type="hidden" name="redirectUrl" value='<s:property value='redirectUrl'/> '/>
  <table  width="100%" border="0" cellpadding="0" cellspacing="0"    style="border-color:#CCCCCC;">
    <tr>
      <td class="left-td-width-bg" align="right">付款方名称：</td>
      <td colspan="3" class="right-td-width-bg-left">${bill.paymentName }</td>
      <td class="left-td-width-bg"  align="right">发票金额：
      </td>
      <td  class="right-td-width-bg-left" ><s:property value="formatAmount(bill.receivableAmount)" /></td>
    </tr>
    <tr>
      <td class="left-td-width-bg"  align="right">申请人：</td>
      <td colspan="3" class="right-td-width-bg-left" >${bill.creator }</td>
      <td class="left-td-width-bg"  align="right">申请时间：</td>
      <td class="right-td-width-bg-left"  ><s:date name="bill.applyDate" format="yyyy-MM-dd"/></td>
    </tr>
    <tr>
      <td colspan="6" align="right">
      <table width="100%">
        <tr>
          <td class="left-td-width-bg"><font  color="red" size="2">* </font>发票号：</td>
          <td> 
          <input class="input"  type="text"  name="billDTO.billNum" id="textfield4" dataType="Unique|Require"  msg="发票号必须是唯一|发票号不能为空" classType="com.jysz.certificate.persistence.model.mf.Bill" ignoreCase="true"  valProperty="billNum" entityId="${bill.id}" contextPath="${contextPath}"></td>
          <td class="left-td-width-bg" ><font  color="red" size="2">* </font>发票名：</td>
          <td>
          <input class="input"  type="text"  name="billDTO.billName" id="textfield4" dataType=Require"  msg="发票名不能为空" >
          </td>
          <td class="left-td-width-bg"><font  color="red" size="2">* </font>开票时间：</td>
          <td>
		  	<input  dataType="Require" msg="请选择开票时间"  name="billDTO.openDate"   class="Wdate" type="text" style="width: 100px" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" value="<s:date name="openDateBegin" format="yyyy-MM-dd"/>"/>
		  </td>
        </tr>
      </table></td>
      </tr>
    <tr>
      <td colspan="6" align="center">
        <input type="submit" name="button" class="btn_save" id="button" value="">
        <input type="button" name="button2" class="btn_rest" onClick="clearForm(this.form);return false;" id="button2" ></td>
    </tr>
  </table>
  <input type="hidden" name="billDTO.id" value="${bill.id }">
</form> 
</div>
<br/><br/><br/><br/><br/>
		<div><jsp:include page="/include/footer.inc"></jsp:include></div>
 
 
</body>
</html>